home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / mkutil21.zip / MAKEDEFS / DJ32.MK < prev    next >
Text File  |  1995-02-06  |  4KB  |  123 lines

  1. #############################################################################
  2. #
  3. #                       Copyright (C) 1994 SciTech Software
  4. #                               All rights reserved.
  5. #
  6. # Descripton:   Generic DMAKE startup makefile definitions file. Assumes
  7. #               that the SCITECH environment variable has been set to point
  8. #               to where all our stuff is installed. You should not need
  9. #               to change anything in this file.
  10. #
  11. #               DJGPP port of GNU C/C++ to DOS with go32 DOS Extender.
  12. #
  13. # $Id: dj32.mk 1.1 1995/02/06 12:49:39 kjb release $
  14. #
  15. #############################################################################
  16.  
  17. # Disable warnings for macros redefined here that were given
  18. # on the command line.
  19. __.SILENT       := $(.SILENT)
  20. .SILENT         := yes
  21.  
  22. # File suffix definitions
  23.    L            := .a     # Libraries
  24.    E            := .exe   # Executables
  25.    O            := .o     # Objects
  26.    A            := .asm   # Assembler sources
  27.    P            := .cpp   # C++ sources
  28.  
  29. # Import enivornment variables that we use
  30. TMPDIR := $(ROOTDIR)/tmp
  31. .IMPORT .IGNORE : TMPDIR COMSPEC INCLUDE LIB SCITECH DBG OPT SHW BETA FPU
  32.  
  33. # We use the MSDOS shell at all times
  34.    SHELL        := $(COMSPEC)
  35.    GROUPSHELL   := $(SHELL)
  36.    SHELLFLAGS   := $(SWITCHAR)c
  37.    GROUPFLAGS   := $(SHELLFLAGS)
  38.    SHELLMETAS   := *"?<>
  39.    GROUPSUFFIX  := .bat
  40.    DIRSEPSTR    := \\
  41.    DIVFILE       = $(TMPFILE:s,/,\)
  42.  
  43. # Default commands for compiling, assembling linking and archiving
  44.    CC           := gcc      # C-compiler and flags
  45.    CFLAGS       := -Wall
  46.    AS           := tasm     # Assembler and flags
  47.    ASFLAGS      := /mx /m /D__FLAT__ /i$(SCITECH)\INCLUDE
  48.    LD           := dj_ld    # Loader and flags
  49.    LDFLAGS       = $(CFLAGS)
  50.    LIB          := ar       # Librarian
  51.    LIBFLAGS     := rs
  52.  
  53. # Optionally turn on debugging information
  54. .IF $(DBG)
  55.    CFLAGS       += -g       # Turn on debugging for C compiler
  56.    ASFLAGS      += /zi      # Turn on debugging for assembler
  57. .END
  58.  
  59. # Optionally turn on optimisations
  60. .IF $(OPT)
  61.    CFLAGS       += -O2
  62. .END
  63.  
  64. # Optionally turn on direct i387 FPU instructions
  65.  
  66. .IF $(FPU)
  67.    CFLAGS       += -DFPU387
  68.    ASFLAGS      += -DFPU387
  69. .END
  70.  
  71. # Optionally compile a shareware version of a product
  72. .IF $(SHW)
  73.    LIB_DIR      := LIBSW
  74.    CFLAGS       += -DSHAREWARE
  75. .ELSE
  76.    LIB_DIR      := LIB
  77. .END
  78.  
  79. # Optionally compile a beta release version of a product
  80. .IF $(BETA)
  81.    CFLAGS       += -DBETA
  82.    ASFLAGS      += -DBETA
  83. .END
  84.  
  85. # DOS extender dependant flags
  86.    DX_CFLAGS    += -DDJGPP
  87.    DX_ASFLAGS   += -DDJGPP
  88.  
  89. # Define where to install library files
  90.    LIB_DEST     := $(SCITECH)\$(LIB_DIR)\DJ32
  91.  
  92. # Definition of $(MAKE) macro for recursive makes.
  93.    MAKE = $(MAKECMD) $(MFLAGS)
  94.  
  95. # Macro to install a library file
  96.    INSTALL      := cp
  97.  
  98. # Implicit generation rules for making object files
  99.    %$O: %.c ; $(CC) $(CFLAGS) -c $<
  100.    %$O: %$P ; $(CC) $(CFLAGS) -c $<
  101.    %$O: %$A ;
  102. @[
  103.     $(AS) $(ASFLAGS) $(<:s,/,\)
  104.     emxaout -u $*.obj
  105. ]
  106.  
  107.  
  108. # Implicit rule for building a library file using response file
  109.    %$L:      ; $(LIB) $(LIBFLAGS) $@ @$(mktmp $?\n))
  110.  
  111. # Implicit rule for building an executable file using response file
  112.    %$E:      ; $(LD) $(LDFLAGS) $@ @$(mktmp $(&:s/\/\\) $(EXELIBS) -lm -lpc)
  113.  
  114. # DMAKE uses this recipe to remove intermediate targets
  115. .REMOVE :; $(RM) -f $<
  116.  
  117. # Turn warnings back to previous setting.
  118. .SILENT := $(__.SILENT)
  119.  
  120. # We dont use TABS in our makefiles
  121. .NOTABS         := yes
  122.  
  123.